import api from '../utils/axios'
import qs from 'qs'

import dataUtil from '../utils/dataUtil'

export default {

    getKeywords: function (option) {
        return api.post('api/v1/advance/keyword', option).then((resp) => {
            return Promise.resolve(resp.data)
        })
    },

    getDatas: function (option, id) {
        option = dataUtil.formatApiOption(option)
        return api.post(`api/v1/datasets/${id}`, option).then((resp) => {
            return Promise.resolve(dataUtil.formatTableData(resp.data,option.pageNumber ,option.pageSize))
        })
    },


}
